package cn.com.nes.site.service.crm.customer;

import cn.com.nes.mybatis.agent.crm.entity.Customer;
import cn.com.nes.site.entity.em.crm.customer.CustomerNatureEnum;
import cn.com.nes.site.service.crm.customer.bo.CustomerBO;
import org.springframework.stereotype.Service;

/**
 * 企业客户
 */
@Service
public class EnterpriseCustomerBuilder extends CustomerBuilder {

    @Override
    public CustomerNatureEnum getType() {
        return CustomerNatureEnum._enterprise;
    }

    @Override
    protected void validDefaultField(CustomerBO bo) {
    }

    @Override
    protected void settingDefaultField(CustomerBO bo, Customer customer) {
        customer.setDistributorCode(bo.getDistributorCode());
        customer.setDistributorType(bo.getDistributorType());
        customer.setChannelPerson(bo.getChannelPerson());
        customer.setNatureOfCompany(bo.getNatureOfCompany());
        customer.setLegalPerson(bo.getLegalPerson());
        customer.setEstablishmentTime(bo.getEstablishmentTime());
        customer.setUnifiedcreditCode(bo.getUnifiedcreditCode());
        customer.setRegisteredCapital(bo.getRegisteredCapital());
        customer.setScopeOfBusiness(bo.getScopeOfBusiness());
        customer.setWebsite(bo.getWebsite());
    }
}
